.class public Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;
.super Landroid/app/Activity;
.source "TetheringProvisionActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/tecace/tetheringprovision/TetheringProvisionActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "ShowNotificationDialogATT"
.end annotation


# instance fields
.field private final NotificationBroadcastReceiver:Landroid/content/BroadcastReceiver;

.field private mMessageReceived:Z


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 819
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 820
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->mMessageReceived:Z

    .line 883
    new-instance v0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT$1;

    invoke-direct {v0, p0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT$1;-><init>(Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;)V

    iput-object v0, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->NotificationBroadcastReceiver:Landroid/content/BroadcastReceiver;

    .line 819
    return-void
.end method

.method static synthetic access$0(Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 820
    iput-boolean p1, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->mMessageReceived:Z

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4
    .parameter "savedInstanceState"

    .prologue
    const/4 v3, 0x1

    .line 824
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 827
    invoke-virtual {p0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getWindow()Landroid/view/Window;

    move-result-object v1

    const/16 v2, 0x80

    invoke-virtual {v1, v2}, Landroid/view/Window;->addFlags(I)V

    .line 829
    const-string v1, "TetheringProvision"

    const-string v2, "onCreate on ShowNotificationDialogATT"

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 831
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "com.tecace.tetheringprovision.action.closenotidialog"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 832
    .local v0, mNotificationIntentFilter:Landroid/content/IntentFilter;
    iget-object v1, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->NotificationBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v1, v0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 834
    invoke-virtual {p0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->setPreventScreenRotation()V

    .line 836
    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->requestWindowFeature(I)Z

    .line 837
    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->showDialog(I)V

    .line 838
    return-void
.end method

.method protected onCreateDialog(I)Landroid/app/Dialog;
    .locals 8
    .parameter "id"

    .prologue
    const/4 v7, 0x2

    const/4 v6, 0x1

    const/4 v4, -0x1

    const/4 v5, 0x0

    .line 893
    packed-switch p1, :pswitch_data_0

    .line 936
    const/4 v3, 0x0

    :goto_0
    return-object v3

    .line 895
    :pswitch_0
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 896
    .local v0, builder:Landroid/app/AlertDialog$Builder;
    new-instance v2, Landroid/widget/TextView;

    invoke-direct {v2, p0}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 900
    .local v2, mTitle:Landroid/widget/TextView;
    const-string v3, "tetherchoicetype"

    invoke-static {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionUtils;->getIntFromSharedPreference(Landroid/content/Context;Ljava/lang/String;)I

    move-result v1

    .line 901
    .local v1, mTetherType:I
    if-ne v1, v4, :cond_2

    .line 902
    const v3, 0x7f030004

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    .line 910
    :cond_0
    :goto_1
    const/high16 v3, 0x4190

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextSize(F)V

    .line 911
    const/16 v3, 0x11

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setGravity(I)V

    .line 912
    const/16 v3, 0xe

    invoke-virtual {v2, v5, v3, v5, v5}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 913
    invoke-virtual {v0, v2}, Landroid/app/AlertDialog$Builder;->setCustomTitle(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    .line 917
    const-string v3, "tetherchoicetype"

    invoke-static {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionUtils;->getIntFromSharedPreference(Landroid/content/Context;Ljava/lang/String;)I

    move-result v1

    .line 918
    if-ne v1, v4, :cond_5

    .line 919
    const v3, 0x7f030005

    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 927
    :cond_1
    :goto_2
    const v3, 0x7f030006

    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getString(I)Ljava/lang/String;

    move-result-object v3

    new-instance v4, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT$2;

    invoke-direct {v4, p0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT$2;-><init>(Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;)V

    invoke-virtual {v0, v3, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 933
    invoke-virtual {v0, v5}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    .line 934
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v3

    goto :goto_0

    .line 903
    :cond_2
    if-nez v1, :cond_3

    .line 904
    const v3, 0x7f03000f

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    goto :goto_1

    .line 905
    :cond_3
    if-ne v1, v6, :cond_4

    .line 906
    const v3, 0x7f03000c

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    goto :goto_1

    .line 907
    :cond_4
    if-ne v1, v7, :cond_0

    .line 908
    const v3, 0x7f030012

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    goto :goto_1

    .line 920
    :cond_5
    if-nez v1, :cond_6

    .line 921
    const v3, 0x7f030010

    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    goto :goto_2

    .line 922
    :cond_6
    if-ne v1, v6, :cond_7

    .line 923
    const v3, 0x7f03000d

    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    goto :goto_2

    .line 924
    :cond_7
    if-ne v1, v7, :cond_1

    .line 925
    const v3, 0x7f030013

    invoke-virtual {p0, v3}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    goto :goto_2

    .line 893
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
    .end packed-switch
.end method

.method protected onDestroy()V
    .locals 2

    .prologue
    .line 875
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 876
    iget-object v0, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->NotificationBroadcastReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 877
    iget-boolean v0, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->mMessageReceived:Z

    if-eqz v0, :cond_0

    .line 878
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->mMessageReceived:Z

    .line 880
    :cond_0
    const-string v0, "TetheringProvision"

    const-string v1, "onDestroy on ShowNotificationDialogATT"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 881
    return-void
.end method

.method protected onStop()V
    .locals 2

    .prologue
    .line 864
    invoke-super {p0}, Landroid/app/Activity;->onStop()V

    .line 865
    iget-boolean v0, p0, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->mMessageReceived:Z

    if-nez v0, :cond_0

    invoke-static {}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity;->access$19()Landroid/os/PowerManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/PowerManager;->isScreenOn()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 866
    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.tecace.tetheringprovision.action.closenotidialog"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v0}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->sendBroadcast(Landroid/content/Intent;)V

    .line 867
    const-string v0, "TetheringProvision"

    const-string v1, "onStop in ShowNotificationDialogATT"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 871
    :goto_0
    return-void

    .line 869
    :cond_0
    const-string v0, "TetheringProvision"

    const-string v1, "skip the sendBroadcast(INTENTFILTERCLOSENOTIDIALOG) function cause the screen is currently off"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method public setPreventScreenRotation()V
    .locals 3

    .prologue
    .line 841
    const-string v2, "window"

    invoke-virtual {p0, v2}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/WindowManager;

    .line 842
    .local v1, wm:Landroid/view/WindowManager;
    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    .line 843
    .local v0, display:Landroid/view/Display;
    invoke-virtual {v0}, Landroid/view/Display;->getOrientation()I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 860
    :goto_0
    return-void

    .line 845
    :pswitch_0
    const/4 v2, 0x1

    invoke-virtual {p0, v2}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->setRequestedOrientation(I)V

    goto :goto_0

    .line 849
    :pswitch_1
    const/16 v2, 0x9

    invoke-virtual {p0, v2}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->setRequestedOrientation(I)V

    goto :goto_0

    .line 853
    :pswitch_2
    const/4 v2, 0x0

    invoke-virtual {p0, v2}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->setRequestedOrientation(I)V

    goto :goto_0

    .line 857
    :pswitch_3
    const/16 v2, 0x8

    invoke-virtual {p0, v2}, Lcom/tecace/tetheringprovision/TetheringProvisionActivity$ShowNotificationDialogATT;->setRequestedOrientation(I)V

    goto :goto_0

    .line 843
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
        :pswitch_3
    .end packed-switch
.end method
